<script>
import formMixin from "@/components/formMixin";
import useEvents from '@/hooks/useEvents'
export default {
  name: "AegleInput",
  mixins: [formMixin],
  render(h) {
    if (this.schema) {

      const {eventInputs,eventChanges} = useEvents(this.schema.events)

      return (
        <el-input
          v-model={this.model}
          props={{...this.schema.props}}
          style={{...this.style}}
          onInput={()=> {eventInputs.forEach(fn => fn())}}
          onChange={() => {eventChanges.forEach(fn => {fn()})}}
        ></el-input>
      );
    }
  },
};
</script>

<style></style>
